#ifndef CALCULATEITEM14TESTJSON_H
#define CALCULATEITEM14TESTJSON_H

#include <QObject>
#include <QTest>
#include <QMap>
#include <QVector>
#include <QFile>
#include <QTextStream>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>
#include <QDir>
#include <QDebug>
#include <QHash>
#include <QSet>

// 包含原始C++头文件
#include "../../compare/cschprocessposition.h"
#include "../../compare/cjgorderprocess.h"
#include "../../compare/cjgprocessschedule.h"
#include "../../compare/cschdatacollector.h"
#include "../../compare/csysparamdata.h"
#include "../../compare/ctechmanager.h"
#include "../../compare/cworkertech.h"
#include "../../compare/cjgpositionmanager.h"
#include "../../compare/cjgposition.h"
#include "../../compare/cprescheduling.h"
#include "../../compare/cjgdepandency.h"
#include "../../compare/global.h"

class CalculateItem14TestJson : public QObject
{
    Q_OBJECT

public:
    CalculateItem14TestJson() = default;
    ~CalculateItem14TestJson() = default;

private slots:
    void initTestCase();
    void cleanupTestCase();
    void testCalculateItem14FromJson();

private:
    QString getTestDataBasePath();
    QString getTestResultBasePath();
    QJsonObject readJsonObject(const QString& filePath);
    QJsonArray readJsonArray(const QString& filePath);
    void createFileRecursion(const QString& fileName);
    void loadTestData(const QString& folderPath, CSchProcessPosition& processor);
    
    // 测试单个用例
    void testSingleCase(const QString& folderPath, const QString& resultFileName);

    QString testDataFileBase;
    QString testResultFileBase;
};

#endif // CALCULATEITEM14TESTJSON_H